The present invention relates to an enlargement/reduction type image processing device which is suitable for use in a simplified electrophotographic color copying machine.
In an image processing device which can perform the enlargement and reduction of an original image, the output devices such as an indication device and a recording device used therein generally indicate output data only in the form of binary values of white and black.
As a method for expressing the pseudo-half tone using aforementioned output devices, the dither method is known, which is one type of the area-gradation method, wherein the half-tone image can be expressed by means of altering the number of dots to be recorded in a given area (matrix).
Accordingly, in the dither method, as shown in FIG. 58, the portion corresponding to one pixel of the original, is recorded with one dot using a given threshold value matrix, whereby the output data converted into binary values are obtained. The above-mentioned output data expresses the pseudo-half tone image using the white and black binary values.
On the other hand, a color image processing device having such an output device as described above has been developed, wherein the original image obtained from the image-reading means such as a CCD can be recorded with the externally preset enlargement/reduction ratio.
In this case, an enlarged/reduced image is generally to be obtained by means of altering the frequency of clock (transfer clock) reading out the signal from the CCD depending on the enlargement/reduction ratio.
For example, if the scanning duration of one line in the main scanning direction (horizontal scanning direction) of the output device is T.sub.w, and the number of pixels of one line is N, the frequency f.sub.o of the output device transfer clock can be expressed in the following equation: EQU f.sub.o =N/T.sub.w
In the same manner, if the transfer clock from the CCD is f and the time required for the CCD to scan one line is T, the following equation can be established: EQU f=N/T
Therefore, assuming f&gt;f.sub.o, a reduced original image is recorded; and while assuming f&lt;f.sub.o, an enlarged original image is recorded.
In the conventional image processing device as described above, the CCD transfer clock is altered depending on the enlargement/reduction ratio, resulting in the disadvantages as described below.
First, since the transfer clock supplied to the CCD is altered, the light amount of the exposure lamp has to be controlled together with the transfer clock. Consequently, a circuit for controlling the light amount has to be installed.
Second, since the transfer clock frequency supplied to the CCD has to be variable depending on the enlargement/reduction ratio, the clock oscillator to be employed has to be of a variable type. In such a configuration, the transfer clock frequency must be finely adjusted in order to be able to finely set the enlargement/reduction ratio, thus resulting in a complicated construction of the variable oscillator.
Furthermore, since the alteration of the transfer clock supplied to the CCD depending on the enlargement/reduction ratio is equivalent to the alteration of the sampling position with respect to the original image, the same data of the same sampling position of the original image may be repeatedly used in the image enlargement mode, and in the image reduction mode, some original image data may be eliminated.
In this way, the enlarged/reduced image is obtained by means of simply altering the sampling position of original image data, thus degrading the recorded image quality after the image processing.
To eliminate these disadvantages, the enlarged/reduced image should be obtained by means of increasing or decreasing image data related to a pair of adjacent original image data based on the density level relation between the pair of adjacent original image data after obtaining such original image data.
As in the case described above wherein the data interpolation is used, the image data (interpolation data) of the sampling position depending on the enlargement/reduction ratio is prepared in the form of a ROM table.
The high-speed processing type ROM table is used for this purpose, because the real time processing is required. Also, the addressing the ROM table requires the data (interpolation selection data) for designating the address of the ROM table according to the enlargement/reduction ratio, as well as a pair of image data.
Accordingly, an interpolation data selection means is installed. Also, an address counter for addressing the interpolation selection data itself is installed in the interpolation data selection means. However, if the address counter is so constructed as to be composed of a plurality of binary counter, the enlargement/reduction ratio can be set with the increment of 1/2.sup.n. For example, a counter of 2.sup.6 =64 is used as an address counter, the enlargement/reduction ratio can be set only with the increment of 1/64.
Consequently, it is impossible to enlarge or reduce the original image with the arbitrary increment.
The image processing device according to the present invention using the interpolation table for enlargement and reduction of the original image, is so constructed that the enlargement/reduction ratio can be set with an arbitrary increment.
Also, for example, in order to enlarge the image two times as large as the original one, the frequency requires the clock two times larger than that of the non-enlargement/reduction mode in the enlargement/reduction processing circuit. The circuit components to be used, therefore, have to be operable up to the high frequency range, thus causing the increased cost of the components and the unstable circuit operation.
Additionally, the operation speed of the circuit components, of course, have their own limits, thereby causing various disadvantages to occur; for example, the design maximum enlargement ratio is limited.
Taking such disadvantages into consideration, the present invention proposes an image processing device wherein not only the image quality obtained after the enlargement/reduction processing is improved, but also the maximum enlargement ratio has been raised without unnecessarily increasing the circuit operation frequency.
In an image recording device whereby enlargement and reduction of an original image can be performed, when a photo-electric conversion element is to be used as an image-reading means such as a CCD and the like, it is a general method, as already mentioned above, to obtain the enlarged/reduced image signals by means of increasing or decreasing the appropriate image data depending on the enlargement/reduction ratio with respect to the picture element data of the original image which has been read out by the photoelectric conversion element.
FIG. 54 is a main portion of a block diagram showing an example of a processing system for executing the enlargement/reduction procedures used in an image processing device incorporating the principle described above.
In the diagram, 40 is a memory for the image data, and its input terminal 41 is supplied with an image data D which has been read out by the image reading means and undergone the enlargement and reduction processing. The output image data obtained by an output terminal 42, is supplied to the recording device or the like, thus allowing an enlarged/reduced image to be reproduced.
When executing the enlargement/reduction procedures, the image data quantity to be supplied to the memory 40 is restricted by the recording width of the recording device; in such a case, the output timing of an address generator 47 with respect to the memory 40, is controlled by the enlargement/reduction procedures.
Accordingly, a first counter 43 and a second counter 44 are mounted so that preset values P1 and P2 can be set to each counter, and when both counters respectively count clock CK (FIG. 55 C) of the specified frequency up to the preset values P1 and P2, a first output pulse C1 and a second output pulse C2 are generated (FIG. 55 D and E).
The first output pulse C1 sets and the second output pulse C2 resets a flip flop 45, whereby a window pulse WP is generated as shown in FIG. 55 F. When this window pulse WP is supplied to a gate circuit 46 as a gate pulse, the clock CK is supplied to the address generator 47 during a time period which corresponds to a width W1 of the window pulse WP. However, this clock CK is one which has been synchronized with the enlarged/reduced image data.
As a result, the address data corresponding to the memory 40 is generated only for the period W1; consequently, only the image data corresponding to the period W1 out of the image data (FIG. 55 B) which are regulated by a horizontal effective area signal H-VALID or a horizontal direction valid signal H-VALID as shown in FIG. 55 A, is written in the memory (FIG. 55 G).
Therefore, if the preset values P1 and P2 are modified according to the enlargement/reduction ratio, the width W1 of the window pulse changes proportionally to the modification, whereby the image data quantity to be written into the memory 40 is restricted.
In the case of reduction, the window pulse WP and the width of the horizontal effective area signal H-VALID are processed in the same area.
On the other hand, in the case of enlargement, since the image data quantity tends to increase, taking the amount to be increased into consideration, the width of the window pulse WP is so designed as to be small with respect to the width of the horizontal effective signal H-VALID in order to eliminate the data quantity.
However, in the conventional image processing device having the enlargement/reduction function as described above, there are following problems:
In the construction as shown in FIG. 54, even if the image data quantity to be written into the memory 40 is restricted depending on the enlargement/reduction ratio, the initial writing address of the memory 40 is always designated to the first address (0 address) thereof regardless of the enlargement ratio; therefore, especially in such a case the construction is applied to an image processing device wherein image reading or image recording is executed based on the center line of an original (recording paper), the image to be recorded sometimes overflows from the transfer area of the recording paper depending on the enlargement ratio.
For example, as shown in FIG. 56, if W is the maximum read out width (equivalent to the width of the horizontal effective area) of the image reading means, in such a device wherein the image data of the original 52 is read out based on a center line l of a table for placing an original 51, and the image is recorded based on the center line l, the image is recorded as shown in FIG. 57 B in the mode using no enlargement/reduction (equal size record), however, in the reduction mode, the image is recorded as shown in FIG. 57 A.
This is because, the first write address of the memory 40, i.e., the 0 address, corresponds to the write start position of the output device (recording device, such as a laser printer). Accordingly, if the size of a recording paper P on which a image is to be recorded is too small, the image may deviate away from the transfer area of the recording paper, resulting in that the reduced image cannot be properly recorded on the recording paper.
Also, if the size of the recording paper P is too large, the reduced image is recorded at the edge portion of the recording paper P, thus providing a disadvantage.
Further, in the case of the enlargement mode, the non-image portion of the original is also enlarged, and the image is enlarged in such a manner as shown in FIG. 57 C, thus providing a possibility that the required range of the image cannot be recorded on a given recording paper P.
Thus, the present invention provides an image processing device having the enlargement/reduction capability, wherein the aforementioned conventional disadvantages are solved, and an enlarged/reduced image can be so recorded as to be always based on the center line without generating any lack of the image to be recorded.
To record the required area of the image on a given recording paper P with object described above, as disclosed in the present invention later on, the enlargement/reduction treated image data may be first accommodated in the output buffer, and then the data is stored in the final memory or supplied to the output device so that an image can be recorded.
In this case, controlling the timing of the writing or reading of the image data with respect to the output buffer depending on the enlargement/reduction ratio, as clarified by the reasons described later on, such disadvantages are eliminated as that the reduced image is recorded in the area deflected from the specified portion of the recording paper, or that a part of the enlarged image is not recorded on the recording paper.
However, the following points should be taken into consideration when such an output buffer as described above is used.
In the output buffer, a line memory or the like is used in order to accommodate the image data. In this case, when altering the ratio from the enlargement mode to the reduction mode, a part of the original image data remains in the line memory. That is to say, as shown in FIG. 59, when the previous ratio and the current ratio differ from each other and the latter is smaller than the former, i.e., if the ratio M1 of the previous reduction processing and the ratio M2 of the current reduction processing can be expressed in the equation, EQU M1&gt;M2
then the image data corresponding to the address of the (M1-M2) remains in the memory without being rewritten for the reason of processing based on the center line l.
If such a condition is left, a correct image data cannot be outputted, because previous image data and the newly written image data cannot be distinguished.
This kind of problem might occur at the time of switching on the power of the image processing device. That is, at the time of starting the operation such as turning on the power of the image processing device, the line memory data may become "1" as well as "0", whose probability is 50%.
When the device is in the all clear ("0") status, there is no problem; however, in other statuses, the original image data and the current image data cannot be distinguished, thus, as described above, there is a possibility that a correct image data might not be read out.
The present invention is so designed as to solve the problems as described above, more particularly to propose an enlargement/reduction type image processing device wherein the residual image data occurring in the line memory at the time of reduction processing can be reliably eliminated.